
local style_bg = lv.create_style()

local style_indic = lv.create_style()

lv.style_set_border_color( style_bg, lv.palette_main( lv.LV_PALETTE_BLUE ) );

lv.style_set_border_width( style_bg, 2 );

lv.style_set_pad_all( style_bg, 6 );

lv.style_set_radius( style_bg, 6 );

lv.style_set_anim_time( style_bg, 1000 );


lv.style_set_bg_opa( style_indic, lv.LV_OPA_COVER );

lv.style_set_bg_color( style_indic, lv.palette_main( lv.LV_PALETTE_BLUE ) );

lv.style_set_radius( style_indic, 3 );

local bar = lv.bar_create( lv.scr_act() );

lv.obj_remove_style_all( bar );

lv.obj_add_style( bar, style_bg, 0 );

lv.obj_add_style( bar, style_indic, lv.LV_PART_INDICATOR );

lv.obj_set_size( bar, 200, 20 );

lv.obj_center( bar );

lv.bar_set_value( bar, 100, lv.LV_ANIM_ON );
